Skip to content

fix(approval): return to the approval behavior from before #4266 - #4337

Merged
DoodleBears merged 3 commits into
mainfrom
claude/restore-send-admission
Nov 17, 2026
Merged

DoodleBears merged 3 commits into
mainfrom
claude/restore-send-admission

Conversation

@DoodleBears

@DoodleBears DoodleBears commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Why the change

#4266 (spec #4210) made every tool declared irreversible + external require approval, even under Full Access. Since then a Human has to approve each Bot DM, @mention, Subagent, Assignment and outbound CLI operation, and every click or keystroke in an authorized Browser or Computer session. The product owner decided to return to the approval behavior from before #4266: effect declarations only label cards.

Refs #4210

Harness / Model

Harness: claude-code
Model: claude-opus-5-5

Special things to note

  • Merge risk: two-way door (revert code and docs). Blast radius: approval admission for first-party tools, the CLI broker, and Browser/Computer pre-execute. Review focus:
    • Admission no longer counts irreversible + external effects.
    • The Full Access request path no longer excludes them.
    • Authorized Browser/Computer sessions return to per-session authorization.
    • The generic path forces the Channel card only for each-use secrets and management.
    • Unchanged: bot_create, attachment writes, protected management (ADR-0249) and secret each-use. Effect labels are still captured and shown on the cards that do appear.
  • Docs and ledger: removes the unreleased changes/4210-irreversible-external-approval.md and the Computer video sentence in the [Permissions] Complete Bot rule management, template deletion and CLI approval effects #4266 fragment, updates bot-approval-policy (en/zh), bot-cli (en/zh) and the verify feature map, and supersedes the fix(approval): admit a Bot reply to its own Source Event without a card #4334 fragment.
  • Verification:
    • Source: 71 approval, effect, CLI broker and Full Access test files, 2163 tests passed. The tests that encoded the [Permissions E2] Full Access 下外部不可撤销行为仍过审 #4210 rule are inverted to the restored behavior. Root tsc --noEmit passed. changelog:check, oxfmt --check, check-tool-effects and check-feature-map passed.
    • Runtime: a Cloud verify Host on this head with the DeepSeek official key. A DM "Reply with the word pong." got the reply pong with zero approval requests in the channel. An earlier commit verified a Subagent call admitted without a card.
    • Not run: real Browser/Computer sessions, external IM sends, mobile approval card rendering. The M15 Team security suite reruns on test(team): M15 real-model Team mode security suite #4304 after merge.
  • CI test plan: as selected by plan tests.

https://claude.ai/code/session_01Lpx6qkvJqKRjdg67NfFT7X


Generated by Claude Code

…gation

#4266 sent every irreversible external first-party tool through approval,
so DMs, @mentions, Subagents and Assignments each waited for a Human
card. The effect rule now applies only to natively admitted tools
(Browser/Computer actions, protected CLI, secret HTTP writes); tools
admitted without a card before #4210 keep that admission.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lpx6qkvJqKRjdg67NfFT7X
@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Explain Change →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 2 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c997d1e1-5f3e-4e07-b014-41c8110f5b55
Commits

Reviewing files that changed from the base of the PR and between 9c4f4fd and 91164bc.

Files selected for processing: 16

  • .agents/skills/verify-deepseekbot/features/tool-approval-simple.md
  • changes/4210-irreversible-external-approval.md
  • changes/4266-approval-review-fixes.md
  • changes/restore-send-admission.md
  • docs/architecture/bot-approval-policy.md
  • docs/architecture/bot-approval-policy.zh.md
  • docs/bot-cli.md
  • docs/bot-cli.zh.md
  • packages/core/src/plugin.ts
  • packages/core/src/workspaces/tool-effects.ts
  • packages/core/test/cli-inbox.test.ts
  • packages/core/test/team-approvals.test.ts
  • packages/core/test/tob-cli-approval.test.ts
  • packages/core/test/tob-cli-broker.test.ts
  • packages/core/test/tool-approval.test.ts
  • packages/core/test/tool-effects.test.ts

No actionable comments were generated in the recent review.

Walkthrough

The change removes the special approval treatment for replies to a Bot’s own Source Event. It updates admission checks, tests, policy documentation, and release notes to reflect the revised behavior.

Changes: Tool admission policy

Layer / File(s) Summary
Effect classification and admission checks
packages/core/src/workspaces/tool-effects.ts, packages/core/test/*
The Source Event reply override is removed, so messages retain their declared send effects. Irreversible external effects alone no longer require admission approval when admission is existing. Tests cover messaging and delegation tools, approval-required tools, and approval decisions.
Policy documentation and release notes
docs/architecture/bot-approval-policy*, changes/*
The policy docs and release notes describe the admission behavior and identify actions that still require approval. The prior Source Event reply changelog entry is removed.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

  • BotHarness/DeepSeekBot#4334: This PR changes the same bot_send_message admission path by adding the Source Event reply exception that this change removes.

Suggested labels: harness:claude-code, model:claude-opus-5-5

Suggested reviewers: claude

Merge Risk: Minimal · previous review 9c4f4

This restores card-free admission for Bot messaging and delegation, which is what the PR intends. No concrete regression is established in the reviewed code. Browser and Computer actions, protected CLI, secret HTTP writes, secrets, Bot creation, attachment writes and protected management still require approval. The one unconfirmed point is whether the native approval layer, which lives outside this repository, ever raises a card for Source Event replies. The author's Cloud run saw no card.

Pre-merge checks: Passed 4

Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title says the PR returns approval behavior to its pre-#4266 state. The changeset does that: it removes the irreversible-and-external approval rule for tools with a non-existing admission, drops t…
Description check Passed The description follows the template's main sections: Why the change, Harness / Model, and Special things to note (merge risk, verification, regression test status, CI plan). It explains the user prob…
Full details: Title check

Explanation

The title says the PR returns approval behavior to its pre-#4266 state. The changeset does that: it removes the irreversible-and-external approval rule for tools with a non-existing admission, drops the #4334 source-reply exception, and updates the matching tests and docs. The title names the main change, but it does not name the scope (Bot messaging, delegation, Browser/Computer sessions) and it refers to #4266 without saying what the change does.

Full details: Description check

Explanation

The description follows the template's main sections: Why the change, Harness / Model, and Special things to note (merge risk, verification, regression test status, CI plan). It explains the user problem, links #4210 with Refs, and lists verification and gaps. Several template items are missing or unclear: the Issue line uses 'Refs #4210' where the template asks for a Closes or Refs decision with reasoning; the 'Fix PRs' item does not name the regression test that fails without the fix and passes with it, nor give a 'No regression test' reason; the 'Change outline' section is absent, and this change touches no UI, so the author should say so; the CI test plan line does not name the selected mode.

Resolution

Optional improvements: name the regression test that fails without the fix and passes with it (or write 'No regression test: <reason>'), state the CI test plan mode (affected, full, or none) instead of 'as selected by plan tests', and add a short note that the Change outline and UI evidence sections do not apply, or add the outline.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: aba6f6f8-801f-4498-9d2c-3c75ff059e8d
Commits

Reviewing files that changed from the base of the PR and between ac3aeb3 and 9c4f4fd.

Files selected for processing: 7

  • changes/4334-source-reply-approval.md
  • changes/restore-send-admission.md
  • docs/architecture/bot-approval-policy.md
  • docs/architecture/bot-approval-policy.zh.md
  • packages/core/src/workspaces/tool-effects.ts
  • packages/core/test/grant-execution.test.ts
  • packages/core/test/tool-effects.test.ts
Files with no reviewable changes: 1

  • changes/4334-source-reply-approval.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.

Effect declarations again only label approval cards. Drop the
irreversible-external admission rule, the per-action Browser/Computer
cards after authorization, and the Full Access exception, so messaging,
delegation and CLI operations run as they did before #4210.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lpx6qkvJqKRjdg67NfFT7X
@DoodleBears DoodleBears changed the title fix(approval): restore card-free admission for Bot messaging and delegation fix(approval): return to the approval behavior from before #4266 Nov 17, 2026
@DoodleBears
DoodleBears merged commit 3b4dce3 into main Nov 17, 2026
16 checks passed
@DoodleBears
DoodleBears deleted the claude/restore-send-admission branch November 17, 2026 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants